const { DataTypes } = require('sequelize');
var {sequelize} = require('../sequelize.js');

const article = sequelize.define('article', {
    title: { // 文章标题
        type: DataTypes.STRING,
        allowNull: false,
    },
    category: { // 文章简介
        type: DataTypes.STRING,
        allowNull: true,
    },
    author:{
        type: DataTypes.STRING,
        allowNull: true,
    },
    like:{
        type: DataTypes.BIGINT,
        allowNull: true,
    },
    watch:{
        type: DataTypes.BIGINT,
        allowNull: true,
    },
    content: { // 文章内容
        type: DataTypes.TEXT,
        allowNull: true
    },
}, {
    // Other model options go here
});
module.exports = article
